package com.qch.edu.Map;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author qch
 * @Date 2021/4/12
 */
public class HashMapTest {
    public static void main(String[] args) {

        /*Map<Integer,String>treepMap=new TreeMap<Integer, String>();
        System.out.println(treepMap.put(3,"22"));
        System.out.println(treepMap.put(4,"44"));
        System.out.println(treepMap.size());

        //collections常用方法
        ArrayList<String> list = new ArrayList<String>();
        Collections.addAll(list,"11","22");
        Collections.binarySearch(list,"11");//binarySearch必须在有序的集合中查找*/

        HashMap<Integer,String>map=new HashMap<Integer, String>();
        map.put(1,"胡乱");
        System.out.println(map);

        ConcurrentHashMap cmap=new ConcurrentHashMap();
        cmap.put(1,"胡乱");
        System.out.println(cmap);
    }
}
